#ifndef WRAP_EVENTFD_H
#define WRAP_EVENTFD_H

namespace Wrap {

int efd_nonblock();
int efd_cloexec();

/// @see https://man7.org/linux/man-pages/man2/eventfd.2.html
/// @return On success, eventfd() returns a new eventfd file descriptor. On
/// error, -1 is returned and errno is set to indicate the error.
/// @throw EINVAL An unsupported value was specified in @c flags.
/// @throw EMFILE The per-process limit on the number of open file descriptors
/// has been reached.
/// @throw ENFILE The system-wide limit on the total number of open files has
/// been reached.
/// @throw ENODEV Could not mount (internal) anonymous inode device.
/// @throw ENOMEM There was insufficient memory to create a new eventfd file
/// descriptor.
int eventfd_(unsigned count, int flag);

}

#endif